/*!
    @header EntitiesExporter
    @abstract A EntitiesExporter allows you to export the content of entities to a xml file.
	@discussion A EntitiesExporter needs to know two few things to export managed objects.
	<ol>
	<li>The names of the entities which should be exported.</li>
	<li>Where the XML file (containing the exported entities) should be saved.</li>
	</ol>
*/

#import <Cocoa/Cocoa.h>
#import "MO2XMLCoreDataAccess.h"

@interface MO2XMLEntitiesExporter : MO2XMLCoreDataAccess {
	NSArray *entityNames;
}

/*!
    @method initWithEntityNames   
    @abstract   Returns an initialized EntitiesExporter object.
    @param names An NSArray containing the names of the entities which should be exported.
*/
- (id)initWithEntityNames:(NSArray *)names;
- (void)dealloc;

/*!
    @method entityNames    
    @result An array containing the entities names of the receiver. The elements in the array are instances of NSString.
*/
- (NSArray *)entityNames;

/*!
    @method setEntityNames  
	@abstract Sets the names of the entities which will be exported.  
    @param names An array containing names of entities you want to export.
*/
- (void)setEntityNames:(NSArray *)names;


- (NSArray *)entitiesAsDictionaries;

/*!
    @method writeToFile:atomically   
	@abstract Exports the managed objects of the specified entities (specified with setEntityNames:(NSArray *)) to the file at path.
    @result Returns YES if everything went fine and NO if there were any errors.
*/
- (BOOL)writeToFile:(NSString *)path atomically:(BOOL)flag;


@end
